package script.grammar.expression;

import script.grammar.symbol.NativeType;
import script.grammar.symbol.Type;

public class AssignmentOperator extends BinaryOperator {
	public AssignmentOperator(String name) {
		super(name);
	}

	@Override
	protected Type computeTypeImpl(Type o1, Type o2) {
		if (o1.equals(o2)) {
			return o1;
		} else if (o1.equals(NativeType.DOUBLE) && o2.equals(NativeType.INT)) {
			return o1;
		}
		return NativeType.VOID;
	}

}
